#ifndef PALETTE_SHOWER_H
#define PALETTE_SHOWER_H

#include <memory>
#include <QWidget>
#include <QHBoxLayout>
#include <QGraphicsView>
#include <common/Palette.h>
#include "PaletteScene.h"

class PaletteShower : public QWidget
{
Q_OBJECT
    friend class PaletteScene;
public:
    explicit PaletteShower(QWidget *parent = nullptr);
    ~PaletteShower() override;
    uint8_t pickedColorIndex = 0;
    uint8_t passedColorIndex = 0;
    void SetPalette(const std::shared_ptr<IPalette> &palette_);
private:
    void UpdateImage();
private:
    std::shared_ptr<IPalette> palette;
    QHBoxLayout *horizontalLayout;
    QGraphicsView *graphicsView1;
    QGraphicsView *graphicsView2;
    PaletteScene *scene;
    PaletteScene *scene2;
};

#endif //PALETTE_SHOWER_H
